<div id="quote-preview">
<?php

    if(isset($quotes) && $quotes)
    {
        $this->_viewVars['header'] = 'Preview';
        echo $this->_render(VIEWS . '/quotes/index.thtml', $this->_viewVars);
    }

?>
</div>
<h1>
	<?php
		
		if($header)
			echo $header;
	
	?>
</h1>
<form id="quote-edit" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
	<div>
	   <div id="quote-edit-body-wrapper">
	       	<div class="quote-edit-label">Quote body <a href="<?php echo $html->url('/pages/help') ?>">(help)</a>:</div>
	       	<?php echo $form->textarea('Quote.body', array('id' => 'quote-edit-body', 'rows' => '20', 'cols' => '10')) ?>
	      	<span class="quote-edit-label"><?php echo $form->error('Quote/body', 'The quote body cannot be empty.'); ?></span>
	   </div>
	   <div id="quote-edit-notes-wrapper">
		<div class="quote-edit-notes">Notes:</div>
	       <?php echo $form->textarea('Quote.notes', array('id' => 'quote-edit-notes', 'label' => 'Notes: ', 'rows' => '20', 'cols' => '10')) ?>
	   </div>
	   <div id="quote-edit-tags-wrapper">
		<div class="quote-edit-tags">Tags: <?php echo $html->link('(help)', '/pages/help'); ?></div>
	       <?php echo $form->text('Quote.tags', array('id' => 'quote-edit-tags', 'class' => 'textbox')); ?>
	   </div>
	   <?php
	   if(!$loggedIn && !isset($quote)) {
	   ?>
	       <div class="quote-anon-warning">
		   You are not logged in. Your IP address will be visible to administrators.
		   If this is not what you desire, you can log in with OpenID using the sidebar, which will hide your IP address.
	       </div>
	   <?php
	   }
	   ?>
	   <div id="quote-edit-submit-wrapper">
	       <?php echo $form->submit('Submit', array('id' => 'quote-edit-submit', 'name' => 'quote-edit-submit', 'class' => 'button', 'div' => false)) ?>
	       <?php echo $form->submit('Preview', array('id' => 'quote-edit-preview', 'name' => 'quote-edit-preview', 'class' => 'button', 'div' => false)) ?>
	   </div>
   </div>
</form>
